package com.ai.cmdc.codeutil;

import com.ai.cmdc.codeutil.export_generator.TableExportGenerator;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.io.IOException;

/**
 * @author zhoulk
 * @Description: 设计系统表出入参导出工具
 * @date: 2019/7/25
 */
@SpringBootTest(classes = ExportSvcApplication.class)
@RunWith(SpringJUnit4ClassRunner.class)
public class DesignTableExportStart {

    @Autowired
    TableExportGenerator tableTableExportGenerator;

    /**
     * 启动方法
     */
    @Test
    public void startRun() throws IOException {
        String[] tables = {"UC_RCV_ADDR_CHECK"}; //输入要导出的表名，并将DataSourceConfig中国的userName改为对应中心户名

        String fileDir = "C:\\Users\\kokor\\Desktop\\"; //文件数据路径

        for (String table : tables) {
            tableTableExportGenerator.execution(table, fileDir);
        }
    }


}
